<?php 
class Success extends CI_Controller {  
	public function index() {
    	$this->lang->load('account/success');
  
    	$this->document->setTitle($this->lang->line('heading_title'));

		$data['breadcrumbs'] = array();

      	$data['breadcrumbs'][] = array(
        	'text'      => $this->lang->line('text_home'),
			'href'      => site_url('common/home'),       	
        	'separator' => false
      	); 

      	$data['breadcrumbs'][] = array(
        	'text'      => $this->lang->line('text_account'),
			'href'      => site_url('account/account'),
        	'separator' => $this->lang->line('text_separator')
      	);

      	$data['breadcrumbs'][] = array(
        	'text'      => $this->lang->line('text_success'),
			'href'      => site_url('account/success'),
        	'separator' => $this->lang->line('text_separator')
      	);

    	$data['heading_title'] = $this->lang->line('heading_title');

		if (!$this->cconfig->get('config_customer_approval')) {
    		$data['text_message'] = sprintf($this->lang->line('text_message'), site_url('information/contact'));
		} else {
			$data['text_message'] = sprintf($this->lang->line('text_approval'), $this->cconfig->get('config_name'), site_url('information/contact'));
		}
		
    	$data['button_continue'] = $this->lang->line('button_continue');
		
		if ($this->hkcart->hasProducts()) {
			$data['continue'] = site_url('checkout/cart');
		} else {
			$data['continue'] = site_url('account/account');
		}

		
		
		
		$data['header'] = helper_load_header();
		$data['column_left'] = helper_load_left();
		$data['column_right'] = helper_load_right();
		$data['content_top'] = helper_load_top();
		$data['content_bottom'] = helper_load_bottom();
		$data['footer'] = helper_load_footer();
		
		
		$this->load->view("common/success", $data);
					
  	}
}
?>